# /bin/bash

# git checkout .
# git pull
# npm install
container_name='test-server'

docker stop $container_name > /dev/null 2>&1
docker rm $container_name > /dev/null 2>&1
docker rmi $container_name > /dev/null 2>&1

docker build -t $container_name .

docker run --name $container_name \
-e TZ=Asia/Shanghai \
-e NODE_ENV=production \
-e DB_HOST=localhost \
-e DB_USER=root \
-e DB_PWD= \
-e DB_NAME=nest_test \
-e TIMEZONE=+08:00 \
-p 5001:3000 \
-d $container_name

docker logs -f $container_name
